﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NewRen.Models
{
    public class ExchangeCode
    {
        public int ID { set; get; }

        public string Code { set; get; }

        [ForeignKey("Product")]
        public int ProductID { set; get; }

        public virtual Product Product { set; get; }

        [ForeignKey("User")]
        public int UserID { set; get; }

        public virtual User User { set; get; }


        [Index]
        public DateTime Time { set; get; }

        /// <summary>
        /// 是否领取奖品
        /// </summary>
        public bool IsExchange { set; get; }


        /// <summary>
        ///  领取时间
        /// </summary>
        public DateTime? ChangeTime { set; get; }
    }
}
